import QtQuick 2.0

Rectangle {
    id: root

    property int scrollSpeed: 500

//    width: 1920
//    height: 1080
    color: "#000000"

//    Image {
//        id: backgroundImage
//        anchors.centerIn: parent
//        //source: "images/billboard.png"
//        source: "images/background2.png"
//    }

    Item {
        id: sourceArea
        width: 41
        height: 15
        Text {
            id: textItem
            // This is used to force x to animate int instead of float
            property int textXPos
            x: textXPos
            anchors.verticalCenter: parent.verticalCenter
            // Select suitable font family and size
            font.family: "Arial"
            font.pixelSize: 14
            font.bold: true
            color: "#ffffff"
            smooth: false
            text: "Shave Co.ltd "
            NumberAnimation on textXPos {
                loops: Animation.Infinite
                from: sourceArea.width; to: -textItem.paintedWidth; duration: textItem.text.length*scrollSpeed
            }
        }
    }

    LedScreen {
        id: ledScreen
        sourceItem: sourceArea
        anchors.fill: parent
        ledSize: 16
        threshold: 0.48
        Image {
            anchors.fill: parent
            source: "images/reflection.png"
        }
    }
}
